package hotel.switchs.oversea.online.mapper;

import hotel.base.oversea.entity.SwitchHotelActiveTagEntity;
import hotel.base.oversea.repository.MyMapper;
import hotel.switchs.oversea.api.VO.request.ActiveTagVO;
import hotel.switchs.oversea.api.entity.SwitchHotelActiveTag;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author lmf
 * @Date 2020/8/17 17:05
 **/
public interface SwitchHotelActiveTagMapper extends MyMapper<SwitchHotelActiveTagEntity> {
    /**
     * @author: lmf
     * @date: 2020/8/17 17:39
     * 根据子酒店id 和售卖房型id
     */
    SwitchHotelActiveTagEntity selectHotelIdAndRoomIdAndTime(@Param("hotelId") int hotelId, @Param("roomId") int roomId, @Param("time") String time);

    /**
     * @author: lmf
     * @date: 2020/9/3 11:44
     * 获取所有参与促销标签的酒店id
     */
    List<SwitchHotelActiveTagEntity> selectAllRoomId(@Param("time") String time);

    /**
     * @author: lmf
     * @date: 2020/9/4 15:05
     * 批量插入 存在则更新 不存在则插入
     */
    Integer insertBatchUpdate(List<SwitchHotelActiveTagEntity> list);


    /**
     * <H1>新增活动</H1>
     *
     * @param hotelRoomInfoList 实体对象
     * @return java.lang.Integer
     * @author HuangT
     * @Date 2020/9/11 14:36
     */
    Integer insertActive(List<SwitchHotelActiveTag> hotelRoomInfoList);

    /**
     * <H1>获取活动列表</H1>
     *
     * @param activeTagVO 实体对象
     * @return java.util.List<hotel.switchs.oversea.api.entity.SwitchHotelActiveTag>
     * @author HuangT
     * @Date 2020/9/11 14:36
     */
    List<SwitchHotelActiveTag> activeInfoList(ActiveTagVO activeTagVO);
}
